// export const action = {
// 	nuxtServerInit(stroe, context) {
// 		console.log(stroe)
// 		console.log(context)
// 	}
// }

export const actions = {
  nuxtServerInit(stroe, {
    app: {
      $cookies
    }
  }) {
    let user = $cookies.get("user")
    console.log("nuxtServerInit ---- user = ", user)
    // console.log(stroe)
    // console.log(context)
  }
}

export const state = () => ({
  id: 1,
  name: "黄月月"
})

export const mutations = {
  updateId(state, id) {
    state.id = id
  },
  updateName(state, name) {
    state.name = name
  }
}

export const getters = {
  getId(state) {
    return state.id
  }
}
